-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenEXRConfig.h.in uses version extracted from openexr_version.h #1527
OpenEXRConfig.h.in uses version extracted from openexr_version.h #1527
Conversation
The logic was already in place to extract the version from `openexr_version.h`, so the `.in` file just needed to reference the proper CMake variables. This also duplicates the `OpenEXR_VERSION_*` settings to `OPENEXR_VERSION_*`. Signed-off-by: Cary Phillips <cary@ilm.com>
@Vertexwahn, is there a straightforward way to propagate the version info from |
Signed-off-by: Cary Phillips <cary@ilm.com>
Also added a fix for messy formatting of the version test error message in OpenEXRCoreTest, it was including unnecessary quotes around the "extra" part. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clean up, and completing the version work. This all looks much better than before.
Signed-off-by: Cary Phillips <cary@ilm.com>
* OpenEXRConfig.h.in uses version extracted from openexr_version.h The logic was already in place to extract the version from `openexr_version.h`, so the `.in` file just needed to reference the proper CMake variables. This also duplicates the `OpenEXR_VERSION_*` settings to `OPENEXR_VERSION_*`. Signed-off-by: Cary Phillips <cary@ilm.com> * bazel Signed-off-by: Cary Phillips <cary@ilm.com> * comment Signed-off-by: Cary Phillips <cary@ilm.com> * fix formatting of core version test error message Signed-off-by: Cary Phillips <cary@ilm.com> * fix extra comparison test Signed-off-by: Cary Phillips <cary@ilm.com> --------- Signed-off-by: Cary Phillips <cary@ilm.com>
The logic was already in place to extract the version from
openexr_version.h
in the root-level CMakeLists.txt, so theOpenEXRConfig.h.in
file just needs to reference the proper CMake variables for configuration.This is still a bit awkward, since it would be better to simply
#include "openexr_version.h"
fromOpenEXRConfig.h
, but the cmake configuration doesn't readily allow that.The alternative of simply stripping all version #define's from
OpenEXRConfig.h.in
and the requiring an#include "openexr_version.h"
for access to the version is a cleaner option, but might break existing application code, so consider the settings inOpenEXRConfig.h.in
as backwards compatibility.This also duplicates the
OpenEXR_VERSION_*
CMake settings toOPENEXR_VERSION_*
.